mod chinese_calender;
mod common;
mod remain_days;
mod week_counter;

pub fn time_info(time: &str) -> String {
    let date: Vec<u32> = time.split('-').map(|s| s.parse().unwrap()).collect();
    let y = date[0];
    let m = date[1];
    let d = date[2];

    let week_cnt = week_counter::cal_week_count(y, m, d).1;
    let remain_days = remain_days::cal_remain_days(y, m, d);
    let days_to_festival = chinese_calender::cal_days_to_festival(y, m, d);

    println!("RES: {:?}", vec![week_cnt, remain_days, days_to_festival]);
    vec![week_cnt, remain_days, days_to_festival]
        .into_iter()
        .map(|x| x.to_string())
        .collect::<Vec<String>>()
        .join(",")
}
